﻿@inject NavigationManager NavigationManager

@if (Model.RelevancesState == EditState.Preview)
{
    <CnGalWebSite.Shared.MasaComponent.Shared.Editors.Buttons.RevokeButton Url="@("/articles/EditRelevances/" + Model.Id)" ExamineType="Operation.EditArticleRelevanes" OnClickRevoke="OnRevoke" />
}
<div>
    <CnGalWebSite.Shared.MasaComponent.PC.Videos.Relevances.GroupCard Model="Model.RelatedVideos" />
    @if (Model.RelatedEntries.Any())
    {
        <CnGalWebSite.Components.Containers.MasaTitleContainer Icon="@IconType.Entry.ToIconString()" Title="相关词条" Outline Collapable>
         @foreach (var item in Model.RelatedEntries)
            {
                <div class="mb-3">
                    <CnGalWebSite.Shared.MasaComponent.Shared.Cards.Search.EntryInforViewTip Model="item" ShowType />
                 </div>
            }
        </CnGalWebSite.Components.Containers.MasaTitleContainer>
    }
    @if (Model.RelatedArticles.Any())
    {
        <CnGalWebSite.Components.Containers.MasaTitleContainer Icon="@IconType.Article.ToIconString()" Title="相关文章" Outline Collapable>
         @foreach (var item in Model.RelatedArticles)
            {
                <div class="mb-3">
                    <CnGalWebSite.Shared.MasaComponent.Shared.Cards.Search.ArticleInforViewTip Model="item" />
                </div>
            }
        </CnGalWebSite.Components.Containers.MasaTitleContainer>
    }
</div>


@code {
    [Parameter]
    public ArticleViewModel Model { get; set; }

    [Parameter]
    public EventCallback<Operation> OnRevoke { get; set; }
}
